home *** CD-ROM | disk | FTP | other *** search
/ Champak Vol A-4 / (Vol A-4) Vol. A4.iso / Games / loa_and_the_island.swf / scripts / DefineSprite_772 / frame_10 / PlaceObject2_698_170 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2008-03-17  |  472b  |  22 lines

  1. onClipEvent(enterFrame){
  2.    if(_root.paused == false and this.hitTest(_root.lavafilter))
  3.    {
  4.       if(random(100) == 50)
  5.       {
  6.          xgoal = xinit + random(101) - 50;
  7.          ygoal = yinit + random(101) - 50;
  8.       }
  9.       xmove += (xgoal - _X) / 10;
  10.       ymove += (ygoal - _Y) / 10;
  11.       _X = _X + xmove;
  12.       _Y = _Y + ymove;
  13.       xmove /= 1.1;
  14.       ymove /= 1.1;
  15.       play();
  16.    }
  17.    if(_root.paused == true)
  18.    {
  19.       stop();
  20.    }
  21. }
  22.